import request from '@/utils/request_app'

export const uploadFile = data => {
  return request({
    url: 'app/oss/uploadPic',
    method: 'post',
    headers: {
      'Content-Type': 'multipart/form-data',
    },
    data: data,
  })
}

// 上传视频 参数获取  阿里云
export const uploadVideoParamsApi = () => {
  return request({
    url: 'app/ossUploadPolicy',
    method: 'post',
  })
}

// 获取上传凭证
export const getUploadAccount = data => {
  return request({
    url: 'mpapi/api/api/uploadKey',
    method: 'post',
    data: data,
  })
}

export default {
  uploadFile,
  uploadVideoParamsApi,
  getUploadAccount,
}
